package com.leuym.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.leuym.entity.User;
import com.leuym.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.jws.soap.SOAPBinding;

/**
 * @author LiuYiMing
 * @date 2018/8/3 10:23
 * @describe：
 */
@RestController
@RequestMapping("/")
public class TestController {

    @Autowired
    private TestService testService;

    @GetMapping("/sayHello/{name}")
    public String sayHello(@PathVariable("name") String name){
        return testService.sayHello(name);
    }

    @GetMapping("/user")
    public User findUser(){
        return testService.findUser();
    }
}
